package com.hy.lightning.ds.jdbc.datasources;

import javax.sql.DataSource;

public class JdbcConf {
	//数据源 key值
	private String key = "local"; 
	
	//数据源
	private String driverClassName = "com.mysql.jdbc.Driver";
	
	//默认ip
	private String ip = "localhost";
	
	//默认端口
	private String port = "3306";
	
	//默认数据库名称
	private String name = "tasty_0306";
	
	//默认连接url
	private String url = "jdbc:mysql://%s:%s/%s?useUnicode=true&useSSL=false";
	
	//默认用户名
	private String username = "root";
	
	//密码
	private String password = "123456";
	
	//数据源
	private DataSource dataSource;

	public String getKey() {
		return key;
	}

	public void setKey(String key) {
		this.key = key;
	}

	public String getDriverClassName() {
		return driverClassName;
	}

	public void setDriverClassName(String driverClassName) {
		this.driverClassName = driverClassName;
	}

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getPort() {
		return port;
	}

	public void setPort(String port) {
		this.port = port;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getPassword() {
		return password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	public DataSource getDataSource() {
		return dataSource;
	}

	public void setDataSource(DataSource dataSource) {
		this.dataSource = dataSource;
	}

	public JdbcConf(){}
	
	public JdbcConf(String key, String ip, String name, String username, String password) {
		super();
		this.key = key;
		this.ip = ip;
		this.name = name;
		this.username = username;
		this.password = password;
	}
}
